//
// Created by 张亦乐 on 2018/10/24.
//

#ifndef PEONY_FOODMANAGER_HPP
#define PEONY_FOODMANAGER_HPP

#include <map>

typedef uint64_t FOOD_ID;
struct Food
{
    float x;
    float y;
};
class FoodManager
{
private:
    std::map<FOOD_ID ,Food>    _foodDcit;
    int64_t                     _lastFreshtime;//seconds
    FOOD_ID                    _uniqueId;
public:
    FoodManager():_lastFreshtime(0),_uniqueId(0){}
    ~FoodManager(){}
    //定时生成食物
    void CreateFood();
    bool GetFood(FOOD_ID id,Food& out);
    bool EatFood(FOOD_ID id);

};
#endif //PEONY_FOODMANAGER_HPP
